home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12865 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.panther.net!nemesis!hammy!not-for-mail
  2. From: gordon@sneaky.lerctr.org (Gordon Burditt)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: TIME.H for the year 2000?
  5. Date: 2 Apr 1996 22:55:19 -0600
  6. Organization: What organization?
  7. Message-ID: <4jt0bn$1u2@hammy.lonestar.org>
  8. References: <3161A8FC.53AC@dial.cic.net>
  9. NNTP-Posting-Host: news.hammy.lonestar.org
  10.  
  11. >From reading up on the functions in time.h, it looks like it will only 
  12. >handle years < 2000. Is this right? 
  13.  
  14. No.
  15.  
  16. >If so, can someone direct me to any 
  17. >routines that have been written to take into account years >= 2000?
  18.  
  19. The tm_year element of a struct tm contains the year - 1900.
  20. The type of tm_year is int.  It should be able to handle years
  21. up to 34667 (value in tm_year:  32767).  On machines where ints
  22. are 32 bits, this handles years up to over 2 billion.  tm_year 
  23. contains the year-1900, *NOT* the last two digits of the year.
  24.  
  25. One traditional representation of time_t becomes signed in January 2038.
  26. Hopefully we will have gone to 64-bit time_t's by then.
  27.  
  28.                     Gordon L. Burditt
  29.                     sneaky.lerctr.org!gordon
  30.